<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
</head>
<body>
<div id="app">
    <button v-on:click="btn1Click">按钮1</button>

    <button @click="btn2Click('why',age)">按钮2</button>

    <button v-on:click="btn3Click('why',age,$event)">按钮3</button>
</div>
<script src="https://unpkg.com/vue@3"></script>
<script>
    const app=Vue.createApp({
        data(){
            return{
                message:"hello vue",
                age:19
            }
        },
        methods:{
            btn1Click(event){
                console.log("btn1Click:",event)
            },
            btn2Click(name,age){
                console.log("btn2Click:",name,age)
            },
            btn3Click(name,age,e){
                console.log('btn3Click:',name,age,e)
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>